﻿using System;

namespace Demo1
{
    class Program
    {
       public struct PersonStruct
        {
            public string name;
            public string plone;
            public string home;

            public PersonStruct(string name, string plone, string home)
            {
                this.name = name;
                this.plone = plone;
                this.home = home;
            }
        }

       
        static void Main(string[] args)
        {
            //定义一个结构体，名为PersonStruct，有三个成员变量：姓名、电话、地址，
            //在主方法中，创建一个PersonStruct结构体对象p1，为p1的成员变量赋值。
            //再声明一个PersonStruct结构体变量p2，把p1赋值给p2，改变p2的姓名，打印p1的内容。



            PersonStruct p1;
            p1.name = "邓夏晖";
            p1.plone = "18379777344";
            p1.home = "上犹县";

            PersonStruct p2;
            p2.name = "张宏";
            p2.plone = "18460360774";
            p2.home = "南康区";

            
            p2.name ="张伟";
            p2.plone = p1.plone;
            p2.home = p1.home;

            Console.WriteLine(p2.name);
            Console.WriteLine(p2.plone);
            Console.WriteLine(p2.home);

        }
    }
}
